﻿/****************************** Module Header ******************************\
 * Module Name:  tProductCoupon.cs
 * Module Version:  1.0.0 (2013-01-25)
 * Copyright (c) AnyEB.Com (14507247@qq.com)
 * 
 * This source is subject to the GPL License.
 * See http://www.gnu.org/licenses/gpl.html.
 * All other rights reserved.
 * 
 * THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, 
 * EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED 
 * WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE.
\***************************************************************************/

using System;

namespace UCL.Data.ORM.UMD
{
    /// <summary>
    /// 通用-优惠券 数据实体类
    /// </summary>
    [DBTable(Common = "通用-优惠券")]
    public class tGeneralCoupon
    {
        /// <summary>
        /// Guid编号
        /// </summary>
        public Guid ID { get { return _ID ?? default(Guid); } set { _ID = value; } }

        [DBColumn(Alias = "Guid编号", IsKey = true, DefaultValue = "newid()")]
        private Guid? _ID;

        /// <summary>
        /// 优惠券名称（名称中最好包含发放来源和金额，如消费赠送，节日活动，比如：中秋节礼券100元）
        /// </summary>
        public string Name { get { return _Name; } set { _Name = value; } }

        [DBColumn(Alias = "优惠券名称", Length = "32")]
        private string _Name;

        /// <summary>
        /// 优惠券面值
        /// </summary>
        public decimal FaceValue { get { return _FaceValue ?? default(decimal); } set { _FaceValue = value; } }

        [DBColumn(Alias = "优惠券面值")]
        private decimal? _FaceValue;

        /// <summary>
        /// 票券图片
        /// </summary>
        public string Picture { get { return _Picture; } set { _Picture = value; } }

        [DBColumn(Alias = "票券图片", CanBeNull = true, Length = "255")]
        private string _Picture;

        /// <summary>
        /// 票券描述
        /// </summary>
        public string Description { get { return _Description; } set { _Description = value; } }

        [DBColumn(Alias = "票券描述", CanBeNull = true, Length = "Max")]
        private string _Description;

        /// <summary>
        /// 优惠券类型
        /// </summary>
        public string TypeCode { get { return _TypeCode; } set { _TypeCode = value; } }

        [DBColumn(Alias = "优惠券类型", Length = "16")]
        private string _TypeCode;

        /// <summary>
        /// 总数量
        /// </summary>
        public int Quantity { get { return _Quantity ?? default(int); } set { _Quantity = value; } }

        [DBColumn(Alias = "总数量")]
        private int? _Quantity;

        /// <summary>
        /// 使用条件值最低值(兑换所需积分或领取所需消费金额的最低限度)
        /// </summary>
        public decimal ConditionValueMin { get { return _ConditionValueMin ?? default(decimal); } set { _ConditionValueMin = value; } }

        [DBColumn(Alias = "使用条件值", Common = "兑换所需积分")]
        private decimal? _ConditionValueMin;

        /// <summary>
        /// 使用条件值最高值(兑换所需积分或领取所需消费金额的最高限度)
        /// </summary>
        public decimal ConditionValueMax { get { return _ConditionValueMax ?? default(decimal); } set { _ConditionValueMax = value; } }

        [DBColumn(Alias = "使用条件值", Common = "兑换所需积分")]
        private decimal? _ConditionValueMax;

        /// <summary>
        /// 使用条件说明
        /// </summary>
        public string ConditionRemark { get { return _ConditionRemark; } set { _ConditionRemark = value; } }

        [DBColumn(Alias = "使用条件说明", CanBeNull = true, Length = "Max")]
        private string _ConditionRemark;

        /// <summary>
        /// 开始时间
        /// </summary>
        public DateTime BeginTime { get { return _BeginTime ?? default(DateTime); } set { _BeginTime = value; } }

        [DBColumn(Alias = "开始时间", CanBeNull = true)]
        private DateTime? _BeginTime;

        /// <summary>
        /// 结束时间
        /// </summary>
        public DateTime EndTime { get { return _EndTime ?? default(DateTime); } set { _EndTime = value; } }

        [DBColumn(Alias = "结束时间", CanBeNull = true)]
        private DateTime? _EndTime;

        /// <summary>
        /// 扩展标签
        /// </summary>
        public string ExTags { get { return _ExTags; } set { _ExTags = value; } }

        [DBColumn(Alias = "扩展标签", Length = "16")]
        private string _ExTags;

        /// <summary>
        /// 排列次序
        /// </summary>
        public short Ordinal { get { return _Ordinal ?? default(short); } set { _Ordinal = value; } }

        [DBColumn(Alias = "排列次序", DefaultValue = "999")]
        private short? _Ordinal;

        /// <summary>
        /// 状态(0=未启用,1=进行中,4=已作废)
        /// </summary>
        public short State { get { return _State ?? default(short); } set { _State = value; } }

        [DBColumn(Alias = "状态", DefaultValue = "0")]
        private short? _State;

        /// <summary>
        /// 创建时间
        /// </summary>
        public DateTime CreatedTime { get { return _CreatedTime ?? default(DateTime); } set { _CreatedTime = value; } }

        [DBColumn(Alias = "创建时间", DefaultValue = "getdate()")]
        private DateTime? _CreatedTime;

        /// <summary>
        /// 最后更新时间
        /// </summary>
        public DateTime ModifiedTime { get { return _ModifiedTime ?? default(DateTime); } set { _ModifiedTime = value; } }

        [DBColumn(Alias = "最后更新时间", CanBeNull = true)]
        private DateTime? _ModifiedTime;

        /// <summary>
        /// 是否删除
        /// </summary>
        public bool IsDeleted { get { return _IsDeleted ?? default(bool); } set { _IsDeleted = value; } }

        [DBColumn(Alias = "是否删除", DefaultValue = "0")]
        private bool? _IsDeleted;

        /// <summary>
        /// 网站标签
        /// </summary>
        public string SiteTag { get { return _SiteTag; } set { _SiteTag = value; } }

        [DBColumn(Alias = "网站标签", CanBeNull = true, Length = "16")]
        private string _SiteTag;

    }
}
